//package com.app.micaihu.custom.components.net;
//
//import com.android.volley.toolbox.HurlStack;
//import com.squareup.okhttp.OkHttpClient;
//import com.squareup.okhttp.OkUrlFactory;
//
//import java.io.IOException;
//import java.net.HttpURLConnection;
//import java.net.URL;
//
///**
// * Created by kai on 2016/6/12.
// */
//public class OkHttpStack extends HurlStack {
//
//    private OkHttpClient okHttpClient;
//
//    /**
//     * Create a OkHttpStack with default OkHttpClient.
//     */
//    public OkHttpStack() {
//        this(new OkHttpClient());
//    }
//
//    /**
//     * Create a OkHttpStack with a custom OkHttpClient
//     * @param okHttpClient Custom OkHttpClient, NonNull
//     */
//    public OkHttpStack(OkHttpClient okHttpClient) {
//        this.okHttpClient = okHttpClient;
//    }
//
//    @Override
//    protected HttpURLConnection createConnection(URL url) throws IOException {
//        OkUrlFactory okUrlFactory = new OkUrlFactory(okHttpClient);
//        return okUrlFactory.open(url);
//    }
//}
